<style>
#tin_container{
	margin-right:10px;
	padding-bottom: 20px;
}
#tin_container #path{
	color:#FFFFFF;
	padding-top:13px;
	padding-bottom:5px;
	font-weight:bold;
	background-image: url(image/label_long.png);
	background-repeat: no-repeat;
	height: 33px;
	width: 700px;
	padding-left: 10px;
	text-align: left;
}
#tin_container #path a{
	text-decoration:none;
	color:#FFFFFF;
}
#tin_container #path a:hover{
	text-decoration:none;
	color:#FFFFFF;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #FFFFFF;
}
#tin_container #tin_tieude{
	font-weight:bold;
	color:#AE0000;
	font-size: 24px;
	text-transform: uppercase;
	padding-top: 5px;
	padding-bottom: 5px;
}
#tin_container #tin_tomtat{
	color:#009999;
	text-align:justify;
	padding-bottom:20px;
	padding-right:5px;
	font-size:16px;
	padding-left: 5px;
	min-height: 100px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #CC3300;
	display: none;
}
#tin_container #tin_tomtat #image {
	height: 100px;
	width: 100px;
	margin-right: 7px;
	border: 1px dotted #CCCCCC;
}
#tin_container #tin_noidung{
	text-align:justify;
	padding-right: 5px;
	padding-left: 10px;
	padding-bottom: 30px;
	padding-top: 30px;
	background-image: url(images/logo_background.gif);
	background-repeat: no-repeat;
}
#tin_container #booktour {
	background-image: url(image/label_dattour_chitiet.png);
	background-repeat: no-repeat;
	float: left;
	height: 69px;
	width: 700px;
	text-align: left;
}
#tin_container #giohang {
	clear: both;
}
#tin_container .ngay{ color:#036;  font-style:italic; text-align:right}
#formUpdate #soluong {
	font-weight: bold;
	color: #008000;
	background-color: #80FF80;
	text-align: center;
	border: 1px solid #008000;
}
</style>
<style>
#tinmoihon{
	width:320px;
	height:200px;
	min-height:200px;
	background-color:#990033;
} 
#tincuhon {
	width:500px;
	margin-left:100px;
	height:auto;
	background-color:#993300;
	clear: both;
	margin-top: 20px;
} 
#tincuhon  .caption  {
	text-align: center;
}
#giohang {
	width:500px;
	margin-left:100px;
	height:auto;
	background-color:#993300;
	clear: both;
}
#tinlienquan{ clear:left}
#tinmoihon .caption, #tincuhon .caption {
	color:#00CCFF;
	font-weight:bold;
	padding-left:10px;
	text-transform:uppercase;
	border-bottom:solid 1px #99FF00;
	display:block;
	padding-bottom:5px;
	padding-top:5px;
	text-align: center;
}
#tinmoihon a{ color:#66FFCC; text-decoration:none; margin-left:10px}
#tincuhon a{
	color:#01651B;
	text-decoration:none;
	margin-left:10px
}
#tincuhon a:hover {
	color:#0AFA27;
	text-decoration:none;
	margin-left:10px
}
    .hang_le {
	background-color: #DFEFFF;
    }
    .hang_chan {
	background-color: #CAFFCB;
    }
.row {
	height: 30px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #2FBBFF;
}
.row2 {
	height: 30px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #2FBBFF;
	background-color: #CAFFCB;
}
.tongket {
	height: 30px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #2FBBFF;
	background-color: #7DFF81;
}
#caption_giohang {
	height: 30px;
	font-weight: bold;
	text-transform: uppercase;
	color: #00CCFF;
}
.row td {
	height: 30px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #2FBBFF;
}
.scroll-to-top-button{
	width: 32px;
	height: 32px;
	color: #fff;
	font-family: verdana;
	border-radius: 5px;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	-o-border-radius: 5px;
	cursor: pointer;
	padding: 15px;
	margin: 20px;
	background-color: #666;
	background-image: url(image/ScrollToTop.png);
	background-repeat: no-repeat;
	background-position: center center;
}
</style>
<!-----------------------------------SCROLL TO TOP----------------------------------->
<script type="text/javascript" src="Scripts/ScrollToTop/autoScroll.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$.autoScroll({
		scrollDuration: 2000,
		showDuration: 600,
		hideDuration: 300
	});
});​
</script>
<!-----------------------------------SCROLL TO TOP----------------------------------->
<script>
$(document).ready(function(){
	$("#tinmoihon").corner("10px"); $("#tincuhon").corner("10px"); $("#giohang").corner("10px");
});
</script>
<script>
$(document).ready(function(){
	$(".row:even").css("background-color","#DFEFFF");
	$(".row:odd").css("background-color", "#CAE4FF");
	//$(".col:even").css("background-color","#009100");
	//$(".col:odd").css("background-color", "#6F6F6F");
	$(".col:even").addClass("hang_le");
	$(".col:odd").addClass("hang_chan");
});
</script>
<!-----------------------------------CART----------------------------------->

<script>
// cart
var url="cart.php";

$(document).ready(function() {	

if ($("#tsl").text()=="") $("#giohang_tomtat").html("");
else 
//$("#giohang_tomtat").html("Bạn đã đặt "+ $("#tsl").text() +" tour." );
$("#giohang_tomtat").html("<span id='test'> Bạn đã đặt <span id='red'>"+ $("#tsl").text() +"</span> tour. " + "<span id='chitiet2'><a href='index.php?p=tourcart'> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<< Xem chi tiết >></a></span>" + "</span>");

	$(".dathang").click(function(){
		idTin = $(this).attr("idTin");	
		data = 'action=add&idTin='+idTin;
		$("#giohang").load(url,data, xuly);	
		$("#giohang_tomtat").html("Bạn đã đặt "+ $("#tsl").text() +" tour. " );
    })
});

$(document).ready(function() {
//những việc sẽ làm khi nhắp nút cập nhật số lượng
	$(".capnhatsoluong").click(function(){
	var idTin = $(this).attr("idTin");
	var soluong = $(this).parent().find('#soluong').val();
	var data = 'action=update&idTin='+idTin +'&soluong='+soluong;
	$("#giohang").load(url,data, xuly);		
	})
});

$(document).ready(function() {
//những việc sẽ làm khi nhắp nút remove sp
	$(".removesp").click(function(){
		var idTin = $(this).attr("idTin");
		var data = 'action=remove&idTin='+idTin;
		$("#giohang").load(url,data, xuly);	
	})
});

$(document).ready(function() {
//những việc sẽ làm khi nhắp nút xoá hết
	$("#xoahet").click(function(){
		var data = 'action=removeAll';
		$("#giohang").load(url,data, xuly);
	})
});

function xuly(responseText, textStatus, XMLHttpRequest) {
	
if (responseText=="") $("#giohang_tomtat").html("");
else 
//$("#giohang_tomtat").html("Bạn đã đặt "+ $("#tsl").text() +" tour. Tổng tiền là " + $("#tt").text() );
$("#giohang_tomtat").html("<span id='test'> Bạn đã đặt <span id='red'>"+ $("#tsl").text() +"</span> tour. " + "<span id='chitiet2'><a href='index.php?p=tourcart'> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<< Xem chi tiết >></a></span>" + "</span>");


//những việc sẽ làm khi nhắp nút cập nhật số lượng
	$(".capnhatsoluong").click(function(){
	var idTin = $(this).attr("idTin");
	var soluong = $(this).parent().find('#soluong').val();
	var data = 'action=update'+ '&idTin='+idTin +'&soluong='+soluong;
	$("#giohang").load(url,data, xuly);		
	})

//những việc sẽ làm khi nhắp nút remove sp
	$(".removesp").click(function(){
		var idTin = $(this).attr("idTin");
		var data = 'action=remove'+ '&idTin='+idTin;
		$("#giohang").load(url,data, xuly);	
	})

//những việc sẽ làm khi nhắp nút xoá hết
	$("#xoahet").click(function(){
		var data = 'action=removeAll';
		$("#giohang").load(url,data, xuly);
	})
}


</script>
<!-----------------------------------CART----------------------------------->
<?php
require_once('classTin.php');
$t = new tin;
?>
<?php // lấy tin cần hiện
$idTin = $_GET['idTin']; settype($idTin, "int");
$t->CapNhatSolanXemTin($idTin);
$tin = $t -> ChiTietTin($idTin);
$row_tin = mysql_fetch_assoc($tin);
?>
<div id="tin_container">
<div id="path">
    <a href="index.php">Home</a> 
        &nbsp; <img src="image/icon_arrow.png" alt="&gt;"> 
    <a href="index.php?p=con&idTL=<?=$row_tin['idtheloai']?>"><?=$row_tin['TenTL'];?></a>
         &nbsp; <img src="image/icon_arrow.png" alt="&gt;"> 	 
    <a href="index.php?p=cat&idLT=<?=$row_tin['idloaitin']?>"><?=$row_tin['Ten'];?></a>
        &nbsp;<img src="image/icon_arrow.png" alt="&gt;">
		&nbsp;<?=$row_tin['TieuDe']?>
</div>
<div class=ngay>
   Ngày đăng: <?=date('d/m/Y',strtotime($row_tin['Ngay']))?> .  
   Số lần xem: <?=$row_tin['SoLanXem'];?>
</div>
<p id="tin_tieude">
	<?=$row_tin['TieuDe'];?> 
</p>
<!--<p id="tin_tomtat">
<img id="image" src="<?=$row_tin['urlHinh'];?>" width="100" height="100" align="left">
<?=$row_tin['TomTat'];?>
</p>-->
<div id="tin_noidung">
<?=$row_tin['Content'];?>
</div> 
<?php if(($row_tin['idloaitin']==99) || ($row_tin['idloaitin']==100) || ($row_tin['idloaitin']==101) || ($row_tin['idloaitin']==104) || ($row_tin['idloaitin']==105) || ($row_tin['idloaitin']==106)) { ?>
	<div id="empty"></div>
<?php } else { ?>
	<div id="booktour">
	<img class="dathang" src="image/label_dattour_chitiet.png" idTin="<?=$idTin?>" />
	</div>
    <div id="giohang"><?php include "hiengiohang_update.php"; ?></div>
<?php } ?>


<div id="tincuhon">
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><span class="caption"> Tin tiếp theo</span></td>
      </tr>
      <?php $kq = $t->TinCuCungLoai($idTin,$lang,5);?>
      <?php while ($row_kq = mysql_fetch_assoc($kq)) {?>
      <tr class="row">
        <td> <a href="index.php?p=details&idTin=<?=$row_kq['idTin']?>"> <?=$row_kq['TieuDe'];?> </a></td>
      </tr>
      <?php } ?>
    </table>

</div>


</div>
